package com.extra_archive.project.iisu.model 
{

	/**
	 * @class name : ConfigManager
	 * @author : implict (http://extra-archive.com)
	 * @date : 2010. 4. 24.
	 * @description :
	 */
	public class ARConfigManager extends BasicConfigManager
	{
		// asset url
		private var _listImgUrls : Vector.<String> = new Vector.<String>(); 
		private var _detailSwfUrls : Vector.<String> = new Vector.<String>();

		public function ARConfigManager(xmURL : String)
		{
			super(xmURL);
		}
		
		//--------------------------------------------------------------------------
		//
		//    getter/setter
		//
		//--------------------------------------------------------------------------
		
		public function get listImgUrls() : Vector.<String>
		{
			return _listImgUrls;
		}
		
		public function get detailSwfUrls() : Vector.<String>
		{
			return _detailSwfUrls;
		}
		
		//--------------------------------------------------------------------------
		//
		//    Public Methods
		//
		//--------------------------------------------------------------------------
		
		override public function toString() : String 
		{
			return "com.extra_archive.project.iisu.model.ARConfigManager";
		}

		//--------------------------------------------------------------------------
		//
		//    Private Methods
		//
		//--------------------------------------------------------------------------

		override protected function buildConfigItems() : void 
		{
			var listXMLList : XMLList = XMLList(_configXML.list.item);
			var detailXMLList : XMLList = XMLList(_configXML.detail.item);
			var i : uint, len : uint = listXMLList.length();
			for (i; i < len; ++i)
			{
				_listImgUrls[i] = listXMLList[i].img;
			}
			
			var j : uint, len2 : uint = detailXMLList.length();
			for (j; j < len2; ++j)
			{
				_detailSwfUrls.push(detailXMLList[j].swf);
			}
			
			dispatchEvent(new BasicModelEvent(BasicModelEvent.LOAD_CONFIG_COMPLETE));
		}
	}
}
